package zlatan_demo

object ClassDemo02 {
  //创建Person类
  class Person {
    var name = ""
    var age = 0
  }

  //程序主入口
  def main(args: Array[String]): Unit = {
    //创建Person类型的对象
    val p = new Person()
    //变量赋值
    p.name = "张三"
    p.age =23
    //打印值
    println(p.name, p.age)
  }
}
